package zb.feign;

import org.springframework.stereotype.Component;
import zb.pojo.Order;

import java.util.ArrayList;
import java.util.List;

@Component
public class OrderfeignClientfallback implements OrderfeignClient{
    @Override
    public List<Order> ShowUserOrder(Integer uid) {
        List<Order> orders=new ArrayList<>();
        //熔断兜底
        Order order=new Order();
        order.setId(1);
        order.setTitle("服务降级");
        order.setPrice(10.5);
        order.setUid(uid);
        orders.add(order);
        return orders;
    }

    @Override
    public Integer saveOrder(Order order) {
        return null;
    }
}
